home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / security / Watcher / Ideas < prev    next >
Encoding:
Text File  |  1989-07-14  |  2.7 KB  |  71 lines

  1.     Can we have a key which has within it the rel/col fmt info to
  2.     allow the switches in build_{rel,col} to be identical?
  3.  
  4.     should make a note if a change format requires a prev val and no
  5.     key has been specified.
  6.  
  7.     push key or otherwise do non-extern 
  8.  
  9.     Should be able to handle corrupt history files better
  10.         history file is a database.  Does this idea help?
  11.  
  12.     Reg expressions allowable in string change formats?
  13.  
  14.     Right to left parsing as option instead of always l-r.  It may
  15.         be easier at times to specify that the useful info is
  16.         located in the fifth from the right column rather than
  17.         the eighth from the left.
  18.     
  19.     have metacharacter for end of line so we can have something that
  20.         specifies "40-$"
  21.  
  22.     have option to not report on items already reported on.
  23.  
  24.     A problem I had that I eventually solved. I was trying to 
  25.         include a space character in a string value of a change
  26.         format.  I eventually hit on using something like "'
  27.         '", using the tics within the double-quotes to preserve
  28.         the white space in the intended string.  When the tics
  29.         are omitted, the everything including and beyond the
  30.         space was dropped. (In case you're interested, I was
  31.         trying to watch the output of ps -ax to make sure that
  32.         a particular process had not been swapped out by making
  33.         sure there was a space in the status field where the W
  34.         would normally go.)  The clue that led me to the
  35.         solution was a remark in the man page about including
  36.         white space in names. Maybe that could be clarified to
  37.         include all strings?
  38.  
  39.     Have ability to mix column and relative output format.
  40.  
  41.     I can think of some other ways to make the control file specification
  42.         more flexible, and which would make watcher more
  43.         efficent.  One in particular involves a scheme for
  44.         avoiding repeated invocations of relatively expensive
  45.         commands such as ps by saving the output of a single
  46.         invocation in a temporary file for use in several
  47.         different pipelines.
  48.  
  49.     From mcooper%oberon.USC.EDU%ucbvax%unmvax.UNM.EDU@skat.usc.edu 
  50.     The second major change I'm thinking of is a general facility
  51.     for printing messages ala printf().  I'd like to be able to force
  52.     the message format.  Here's a possible syntax:
  53.  
  54.     (ps -aux | /usr/ucb/tail +2)
  55.       { 'ps with no daemons' }
  56.          1-8user%s  9-14 pid%k  15-19 percentcpu%d  42-45 cputime%d:
  57.             cputime 15%;
  58.             cputime 0 20;
  59.             print("User %s exceeds max cpu time (%d) with %d minutes.",
  60.                 user, cputime[2], cputime[0]).
  61.  
  62.     Where "user" is set to the contents of column 1-8, cputime[0] is set to
  63.     the parsed value for "cputime", cputime[1] is set to the first argument
  64.     to "cputime" right before the printf, and cputime[2] is set to the
  65.     second argument to "cputime".
  66.  
  67.     So, what do you think?  Any suggestions?
  68.  
  69.         mike
  70.  
  71.